

********************************************************************************
***      Regression Analysis: Long-Term Health Impacts of the Eritrean-Ethiopian War 
*                             on Young Ethiopian Adults
***      Authors: Dainn Wie & Demeke Yemareshet                             ***
***      Data: Ethiopian DHS 2016 merged with ACLED Conflict Data           ***
***      File: regression.do                                                ***  
********************************************************************************

*-----------------------------*
* Setup
*-----------------------------*

* Turn off pagination in output
set more off

* Close any open logs
cap log close


*Dainn's place
*cd "C:\Users\wie-dainn\Dropbox\Work\Yema\Revision.R1.WDP\Replication package"


*Yemar's place 

cd "C:\Users\hailu\Dropbox\Yema\Revision.R1.WDP\Replication package"


*-----------------------------*
* Load Cleaned & Merged Dataset
*-----------------------------*


********************************************************************************
* Table A2: Descriptive Statistics (Full and Distance-Based Subsamples)
********************************************************************************


*-----------------------------*
* 1. Full Sample
*-----------------------------*


use "merge3", clear

gen individual_sample_weight = sample_weight / 1000000

summarize height_cm weight_kg bmi_ age_members sex_members number_hhmembers location_urban wealth_index highest_educ marital_status 
asdoc sum height_cm weight_kg bmi_ age_members sex_members number_hhmembers location_urban wealth_index highest_educ marital_status , label save(A2-full replace

* Tabulate key categorical variables

tab wealth_index
tab highest_educ
tab marital_status



*-----------------------------*
* 2. Subsample: Within 100 km of Conflict
*-----------------------------*

use "merge3", clear

drop if min_distance > 100

summarize height_cm weight_kg bmi_ age_members sex_members number_hhmembers location_urban wealth_index highest_educ marital_status
asdoc sum height_cm weight_kg bmi_ age_members sex_members number_hhmembers location_urban wealth_index highest_educ marital_status , label save(A2-100km)  replace

* Tabulate key categorical variables

tab wealth_index
tab highest_educ
tab marital_status


*-----------------------------*
* 3. Subsample: Between 100 km and 300 km
*-----------------------------*


use "merge3", clear

drop if min_distance > 300 | min_distance <= 100

summarize height_cm weight_kg bmi_ age_members sex_members number_hhmembers location_urban wealth_index highest_educ marital_status
asdoc sum height_cm weight_kg bmi_ age_members sex_members number_hhmembers location_urban wealth_index highest_educ marital_status , label save(A2-300km)replace

* Tabulate key categorical variables

tab wealth_index
tab highest_educ
tab marital_status


*-----------------------------*
* 4. Subsample: Greater than 300 km
*-----------------------------*


use "merge3", clear


drop if min_distance <= 300 

summarize height_cm weight_kg bmi_ age_members sex_members number_hhmembers location_urban wealth_index highest_educ marital_status
asdoc sum height_cm weight_kg bmi_ age_members sex_members number_hhmembers location_urban wealth_index highest_educ marital_status , label save(A2-non-conflict)replace

* Tabulate key categorical variables

tab wealth_index
tab highest_educ
tab marital_status



********************************************************************************
* Sample Restriction: Reduce Full Sample to Non-Migrants
********************************************************************************


use "merge3", clear


*-----------------------------*
* Define Non-Migrants
* 'years_lived == 95' usually means "always lived in this location"
*-----------------------------*

* Take the max years_lived within each individual ID

bysort case_identification : egen years_li = max( years_lived )

* Drop observations with missing migration info
drop if missing( years_li )

* Keep only individuals who never migrated

drop if years_li != 95


* Save restricted sample

save "nonmigrants", replace


********************************************************************************
* Dynamic Difference-in-Differences (Event Study): 1990–2001 Birth Cohorts
* Outcomes: Height and BMI
* Sample: Non-Migrants within 100km of Conflict (distance_1 == 1)
********************************************************************************



use "nonmigrants", clear


*-----------------------------*
* Generate Event-Time Variables
*-----------------------------*

gen event_time = year-1999
tab event_time

* Event years: 1999–2001

foreach n of numlist 0/2 {
gen policy`n' = (event_time == `n') & (distance_1 == 1)
}

* Pretrend years: 1992–1998

foreach n of numlist 1/7 {
    gen pretrend`n' = (event_time == -`n') & (distance_1 == 1)
}

* Define global macros for model specification

global policy_vars "policy0-policy2"
global pretrend_vars "pretrend1-pretrend7"


********************************************************************************
* Table A3: Dynamic DD Regression – HEIGHT
********************************************************************************


reghdfe height_cm $pretrend_vars $policy_vars, absorb ( region year ) vce (robust)

outreg2 using tableA3.doc, label dec(3) keep(height_cm $pretrend_vars $policy_vars) replace ctitle(reghdfe) title("Table A3 Extended DD") addtext (region FE, Yes, Cohort FE, Yes)


********************************************************************************
* Figure 2A: Event Study Plot – HEIGHT
********************************************************************************

* Initialize plotting variables

gen e_year=.
foreach n of numlist 1/10 {
	replace e_year=`n'-8 in `n'
	}
	
gen d=.
gen ld=.
gen ud=.

* Store estimates and 95% CI for pretrend years

foreach n of numlist 1/7 {
	replace d=_b[pretrend`n'] if e_year==-`n'
	replace ld=_b[pretrend`n']-1.96*_se[pretrend`n'] if e_year==-`n'
	replace ud=_b[pretrend`n']+1.96*_se[pretrend`n'] if e_year==-`n'
}
    
* Store estimates and 95% CI for event years

foreach n of numlist 0/2 {
	replace d=_b[policy`n'] if e_year==`n'
	replace ld=_b[policy`n']-1.96*_se[policy`n'] if e_year==`n'
	replace ud=_b[policy`n']+1.96*_se[policy`n'] if e_year==`n'
	}

* Label variables
	
label var e_year "Years before and after the war"
label var ld "the lower bound of 95% CI" 
label var ud "the upper bound of 95% CI"
label var d "the estimated coefficients"

* Plot figure
 	  
twoway (connected ld e_year, lpattern(dash)) ///
       (connected ud e_year, lpattern(dash)) ///
       (connected d e_year, lpattern(solid)) ///
       , title("A. Height as an Outcome", size(Relative 3.5)) ///
       xtitle("Years before and after the war", size(Relative 3)) ///
       ytitle("Height in cm", size(Relative 3)) ///
       xline(0, lcolor(black) lwidth(small) lpattern(dash)) ///
       yline(0, lcolor(black) lwidth(small) lpattern(solid)) ///
       text(5.7 0 "1999", lcolor(black) lwidth(medium) size(small)) ///
       note("Note: Baseline - cohort born in the years 1990/1991") ///
       graphregion(color(white))	  
	  
	  
********************************************************************************
* Table A3 (continued): Dynamic DD Regression – BMI
********************************************************************************


reghdfe bmi_ $pretrend_vars $policy_vars, absorb ( region year ) vce (robust)

outreg2 using tableA3.doc, label dec(3) keep(bmi_ $pretrend_vars $policy_vars) append ctitle(reghdfe) title("Table A3 Extended DD") addtext (region FE, Yes, Cohort FE, Yes)


********************************************************************************
* Figure 2B: Event Study Plot – BMI
********************************************************************************


foreach n of numlist 1/7 {
	replace d=_b[pretrend`n'] if e_year==-`n'
	replace ld=_b[pretrend`n']-1.96*_se[pretrend`n'] if e_year==-`n'
	replace ud=_b[pretrend`n']+1.96*_se[pretrend`n'] if e_year==-`n'
}

foreach n of numlist 0/2 {
	replace d=_b[policy`n'] if e_year==`n'
	replace ld=_b[policy`n']-1.96*_se[policy`n'] if e_year==`n'
	replace ud=_b[policy`n']+1.96*_se[policy`n'] if e_year==`n'
	}

label var e_year "Years before and after the war"
label var ld "the lower bound of 95% CI"
label var ud "the upper bound of 95% CI"
label var d "the estimated coefficients"

* Plot figure

twoway (connected ld e_year, lpattern(dash)) ///
       (connected ud e_year, lpattern(dash)) ///
       (connected d e_year, lpattern(solid)) ///
       , title("B. BMI as an Outcome", size(Relative 3.5)) ///
       xtitle("Years before and after the war", size(Relative 3)) ///
       ytitle("BMI", size(Relative 3)) ///
       xline(0, lcolor(black) lwidth(small) lpattern(dash)) ///
       yline(0, lcolor(black) lwidth(small) lpattern(solid)) ///
       text(1.4 0 "1999", lcolor(black) lwidth(medium) size(small)) ///
       note("Note: Baseline - cohort born in the years 1990/1991") ///
       graphregion(color(white))	  
	  

	 

********************************************************************************
* Regression Analysis: Impact of Utero Conflict Exposure on Height and BMI
* Sample: Non-Migrants
* Distance Bands: [0–50km], [50–100km], [100–150km], [150–200km], etc.
* Exposure: In utero during 1998–2000
********************************************************************************


use "nonmigrants", clear


*-----------------------------*
* Sample Weight
*-----------------------------*


gen individual_sample_weight = sample_weight / 1000000



********************************************************************************
* Table 1 and Table 2: Distance Bands (0–200km, in 50km bins)
********************************************************************************

* --- Without Education & Wealth Controls ---


reghdfe height_cm  interaction50km interaction100km interaction150km interaction200km sex_members marital_status number_hhmembers [pweight = individual_sample_weight] , absorb ( region year) vce (cluster area)

outreg2 using table1.doc, label dec(3) keep(interaction50km interaction100km interaction150km interaction200km) append ctitle(reghdfe) title(Table 1. The Long run Impact of Conflict on the Height of Young Adults) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)

reghdfe bmi_ interaction50km interaction100km interaction150km interaction200km sex_members marital_status number_hhmembers [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using table2.doc, label dec(3) keep(interaction50km interaction100km interaction150km interaction200km) append ctitle(reghdfe) title(Table 2. The Long run Impact of Conflict on the BMI of Young Adults) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)



* --- With Education & Wealth Controls ---
 

reghdfe height_cm interaction50km interaction100km interaction150km interaction200km sex_members marital_status number_hhmembers wealth_dummy_poor wealth_dummy_middle wealth_dummy_rich educ_dummy_noeduc educ_dummyg1 educ_dummyg2 educ_dummyg3 educ_dummyg4 educ_dummyg5 educ_dummyg6 educ_dummyg7 educ_dummyg8 educ_dummy_sec_hig [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using table1.doc, label dec(3) keep(interaction50km interaction100km interaction150km interaction200km) append ctitle(reghdfe) title(Table 1. The Long run Impact of Conflict on the Height of Young Adults) addtext(Own education, Controlled, Current wealth, Controlled, region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)

reghdfe bmi_ interaction50km interaction100km interaction150km interaction200km sex_members marital_status number_hhmembers wealth_dummy_poor wealth_dummy_middle wealth_dummy_rich educ_dummy_noeduc educ_dummyg1 educ_dummyg2 educ_dummyg3 educ_dummyg4 educ_dummyg5 educ_dummyg6 educ_dummyg7 educ_dummyg8 educ_dummy_sec_hig [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using table2.doc, label dec(3) keep(interaction50km interaction100km interaction150km interaction200km) append ctitle(reghdfe) title(Table 2. The Long run Impact of Conflict on the BMI of Young Adults) addtext (Own education, Controlled, Current wealth, Controlled, region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)



********************************************************************************
* Table 1 and Table 2: Distance Bands (0–300km, in 100km bins)
********************************************************************************

* --- Without Education & Wealth Controls ---

 
reghdfe height_cm interaction interaction2 interaction3 sex_members marital_status number_hhmembers [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using table1.doc, label dec(3) keep(interaction interaction2 interaction3) append ctitle(reghdfe) title(Table 1. The Long run Impact of Conflict on the Height of Young Adults) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)

reghdfe bmi_ interaction interaction2 interaction3 sex_members marital_status number_hhmembers [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using table2.doc, label dec(3) keep(interaction interaction2 interaction3) append ctitle(reghdfe) title(Table 2. The Long run Impact of Conflict on the BMI of Young Adults) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)


* --- With Education & Wealth Controls ---
 

reghdfe height_cm interaction interaction2 interaction3 sex_members marital_status number_hhmembers wealth_dummy_poor wealth_dummy_middle wealth_dummy_rich educ_dummy_noeduc educ_dummyg1 educ_dummyg2 educ_dummyg3 educ_dummyg4 educ_dummyg5 educ_dummyg6 educ_dummyg7 educ_dummyg8 educ_dummy_sec_hig [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using table1.doc, label dec(3) keep(interaction interaction2 interaction3) append ctitle(reghdfe) title(Table 1. The Long run Impact of Conflict on the Height of Young Adults) addtext(Own education, Controlled, Current wealth, Controlled, region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)

reghdfe bmi_ interaction interaction2 interaction3 sex_members marital_status number_hhmembers wealth_dummy_poor wealth_dummy_middle wealth_dummy_rich educ_dummy_noeduc educ_dummyg1 educ_dummyg2 educ_dummyg3 educ_dummyg4 educ_dummyg5 educ_dummyg6 educ_dummyg7 educ_dummyg8 educ_dummy_sec_hig [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using table2.doc, label dec(3) keep(interaction interaction2 interaction3) append ctitle(reghdfe) title(Table 2. The Long run Impact of Conflict on the BMI of Young Adults) addtext (Own education, Controlled, Current wealth, Controlled, region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)




********************************************************************************
* Parental Education (Household Head Education)
* Merge Person Recode (PR) with Household Recode (HR)
* Generate High SES Dummy & Interaction Term
********************************************************************************


* Load main analysis sample (non-migrants only)

use "nonmigrants", clear

* Prepare for merge with HR file

drop _merge
rename case_identification hhid
rename line_household_head hvidx_01

* Merge using household ID and line number of household head

merge m:1 hhid hvidx_01 using "Data\DHS 2016\HR\HR"

sort hhid hvidx_01

* Keep relevant variables after merge

keep hhid line_number country_code area household_number resp_line_number ultimate_unit sample_weight month_interview year_interview date_interview number_hhmembers day_interview region hhselected_domviolence hvidx_01 sex_hh age_hh wealth_index wealthindex_factor wealthindex_urban wealthindexfa_urb sex_members age_members highest_educ mother_alive mothers_line father_alive fathers_line marital_status household_index weight height height_age height_agesd weight_heightsd weight_heightpercen result_measurement cmc smoking bmi rohrer_index homoglobin wealth_dummy_middle wealth_dummy_poor wealth_dummy_rich DHSID DHSCC DHSYEAR CCFIPS ADM1FIPS ADM1FIPSNA ADM1SALBNA ADM1SALBCO ADM1DHS ADM1NAME DHSREGCO DHSREGNA SOURCE URBAN_RURA LATNUM LONGNUM ALT_GPS ALT_DEM DATUM years_lived type_previous reg_previous year_birth month_birth e_day g_day g_month year district1 LATITUDE1 LONGITUDE1 district2 LATITUDE2 LONGITUDE2 district3 LATITUDE3 LONGITUDE3 district4 LATITUDE4 LONGITUDE4 distance1 distance2 distance3 distance4 min_distance height_cm weight_kg bmi_ location_urban distance_50km distance_100km distance_150km distance_200km distance_1 distance_2 distance_3 uteroexp interaction50km interaction100km interaction150km interaction200km interaction interaction2 interaction3 hv108_01 educ_dummy_noeduc educ_dummyg1 educ_dummyg2 educ_dummyg3 educ_dummyg4 educ_dummyg5 educ_dummyg6 educ_dummyg7 educ_dummyg8 educ_dummy_sec_hig


* Drop if sex of household head is missing (ensures validity of merge)

drop if missing( sex_hh)

* Rename variables for consistency

rename hhid case_identification
rename hvidx_01 line_number_hhhead
rename hv108_01 highyear_edu_hhhead

label variable highyear_edu_hhhead "household head highest year of education completed"


* Generate dummy for household heads with high SES (education > 6 years)

gen head_high_SES = highyear_edu_hhhead > 6
label variable head_high_SES "Household head with High SES "


* Create interaction term: Utero exposure * High SES (100km exposure only)

gen interaction_edu = interaction*head_high_SES

label variable interaction_edu "Exposure within 100km* household head with High SES"

* Save updated dataset

save "parentaleduc", replace



********************************************************************************
* Partner Education (Spouse of Household Head)
* Merge PR + HR Data
* Generate Partner Education Dummies & Interaction
********************************************************************************

* Step 1: Load Household Recode (HR) and keep key variables for merge

use "Data\DHS 2016\HR\HR", clear

rename hhid case_identification

keep case_identification hvidx_01 hvidx_02 hv101_01 hv101_02 hv106_01 hv108_02


rename hvidx_01 line_number_hhhead
rename hvidx_02 line_number_head_partner
rename hv108_02 partner_year_education
rename hv101_02 relation_householdhead

save "headpartner", replace


* Step 2: Load main dataset with individual-level outcomes and head education

use "parentaleduc", clear

* Merge by household ID and head's line number

merge m:1 case_identification line_number_hhhead using "headpartner.dta"

* Drop unmatched if line number is missing
drop if missing( line_number )

* Restrict to cases where the partner is the spouse of the household head
keep if relation_householdhead == 2


* Step 3: Create education dummy for the partner
gen second_partner_education = partner_year_education > 6
label variable second_partner_education "Partner with secondary or higher education (High SES)"


* Interaction: conflict exposure within 100km * partner education

gen interaction_parteduc = interaction*second_partner_education

label variable interaction_parteduc "Exposure within 100km*Partner High SES"

* Save the updated dataset

save "parentaleduc", replace



********************************************************************************
* Construct: Average Education of Males Aged 40+ per Household
********************************************************************************


* Load Household Recode (HR) data
 
use "Data\DHS 2016\HR\HR", clear

* Keep individual identifiers and variables: sex (hv104_), age (hv105_), and education (hv108_)

keep hhid hvidx_01 hvidx_02 hvidx_03 hvidx_04 hvidx_05 hvidx_06 hvidx_07 hvidx_08 hvidx_09 hvidx_10 hvidx_11 hvidx_12 hvidx_13 hvidx_14 hvidx_15 hvidx_16 hvidx_17 hvidx_18 hvidx_19 hvidx_20 hv105_01 hv105_02 hv105_03 hv105_04 hv105_05 hv105_06 hv105_07 hv105_08 hv105_09 hv105_10 hv105_11 hv105_12 hv105_13 hv105_14 hv105_15 hv105_16 hv105_17 hv105_18 hv105_19 hv105_20 hv104_01 hv104_02 hv104_03 hv104_04 hv104_05 hv104_06 hv104_07 hv104_08 hv104_09 hv104_10 hv104_11 hv104_12 hv104_13 hv104_14 hv104_15 hv104_16 hv104_17 hv104_18 hv104_19 hv104_20 hv108_01 hv108_02 hv108_03 hv108_04 hv108_05 hv108_06 hv108_07 hv108_08 hv108_09 hv108_10 hv108_11 hv108_12 hv108_13 hv108_14 hv108_15 hv108_16 hv108_17 hv108_18 hv108_19 hv108_20

* Reshape wide to long format

reshape long hv105_ hv104_ hv108_, i(hhid) j(hvidx_) string

keep hhid hvidx_ hv104_ hv105_ hv108_

* Drop individuals with missing sex
drop if missing( hv104_ )


* Keep only individuals aged 40 or above
drop if hv105_ < 40

* Rename variables for clarity
rename hhid case_identification
rename hv105_ greater40_maleage
rename hv104_ greater40_malesex
rename hv108_ greater40_maleeduc

* Drop invalid or missing education values

drop if greater40_maleeduc == 98

* Keep only males (2 = female; 1 = male)
drop if greater40_malesex == 2

* Compute average years of education among males aged 40+ in each household

egen avg_male_education_over_40 = mean( greater40_maleeduc), by( case_identification )

* Drop duplicates to retain one row per household
duplicates report case_identification
duplicates drop case_identification, force

* Save the output
save "male_greater40", replace



********************************************************************************
* Construct: Average Education of Females Aged 40+ per Household
********************************************************************************

* Load Household Recode (HR) data
 
use "Data\DHS 2016\HR\HR", clear

* Keep only IDs and key variables: sex (hv104_), age (hv105_), and education (hv108_)

keep hhid hvidx_01 hvidx_02 hvidx_03 hvidx_04 hvidx_05 hvidx_06 hvidx_07 hvidx_08 hvidx_09 hvidx_10 hvidx_11 hvidx_12 hvidx_13 hvidx_14 hvidx_15 hvidx_16 hvidx_17 hvidx_18 hvidx_19 hvidx_20 hv105_01 hv105_02 hv105_03 hv105_04 hv105_05 hv105_06 hv105_07 hv105_08 hv105_09 hv105_10 hv105_11 hv105_12 hv105_13 hv105_14 hv105_15 hv105_16 hv105_17 hv105_18 hv105_19 hv105_20 hv104_01 hv104_02 hv104_03 hv104_04 hv104_05 hv104_06 hv104_07 hv104_08 hv104_09 hv104_10 hv104_11 hv104_12 hv104_13 hv104_14 hv104_15 hv104_16 hv104_17 hv104_18 hv104_19 hv104_20 hv108_01 hv108_02 hv108_03 hv108_04 hv108_05 hv108_06 hv108_07 hv108_08 hv108_09 hv108_10 hv108_11 hv108_12 hv108_13 hv108_14 hv108_15 hv108_16 hv108_17 hv108_18 hv108_19 hv108_20

* Reshape data from wide to long format
reshape long hv105_ hv104_ hv108_, i(hhid) j(hvidx_) string

keep hhid hvidx_ hv104_ hv105_ hv108_

* Drop individuals with missing sex
drop if missing( hv104_ )

* Keep only individuals aged 40 or above
drop if hv105_ < 40

* Rename variables for clarity

rename hhid case_identification
rename hv105_ greater40_femaleage
rename hv104_ greater40_femalesex
rename hv108_ greater40_femaleeduc

* Drop invalid or missing education values

drop if greater40_femaleeduc == 98

* Keep only females (2 = female; 1 = male)
drop if greater40_femalesex == 1

* Calculate average years of education among women aged 40+ per household
egen avg_female_education_over_40 = mean( greater40_femaleeduc), by( case_identification )

* Drop duplicate household IDs to keep one row per household
duplicates report case_identification
duplicates drop case_identification, force

* Save the output
save "female_greater40", replace



********************************************************************************
* Merge Parent-Level Education: Males and Females Age 40+ into Individual-Level Dataset
********************************************************************************


* Load the main dataset

use "parentaleduc", clear


* Drop previous _merge if it exists
drop _merge

* Merge male education data

merge m:1 case_identification using "male_greater40"

drop _merge

* Merge female education data

merge m:1 case_identification using "female_greater40"

* Drop observations without line number (i.e., not individuals)

drop if missing(line_number)



********************************************************************************
* Generate Interaction Variables Using Pre-Determined SES (Age 40+)                            
* - Based on education of older household members                             
********************************************************************************


* --- For Males over 40 --- *

gen high_SES = greater40_maleeduc > 6 & !missing(greater40_maleeduc)
label variable high_SES "High SES (men >40)"


gen interaction_high_SES = interaction*high_SES
label variable interaction_high_SES "Exposure within 100km*High SES (men >40)"


* --- For Females over 40 --- *

gen high_SESfemale = greater40_femaleeduc > 6 & !missing(greater40_femaleeduc)
label variable high_SESfemale "High SES (women >40)"


gen interaction_high_SESfemal = interaction*high_SESfemale
label variable interaction_high_SESfemal "Exposure within 100km*High SES (men >40)"

* Save the updated dataset

save "parentaleduc", replace



********************************************************************************
* Regressions Using Different Measures of Pre-Determined Household SES         
* - Household Head Education                                                   
* - Partner Education                                                           
* - Adult Male and Female Education (> Age 40)                                 
********************************************************************************

use "parentaleduc", clear

* Define control variables

global controls "sex_members number_hhmembers marital_status wealth_dummy_poor wealth_dummy_middle wealth_dummy_rich educ_dummy_noeduc educ_dummyg1 educ_dummyg2 educ_dummyg3 educ_dummyg4 educ_dummyg5 educ_dummyg6 educ_dummyg7 educ_dummyg8 educ_dummy_sec_hig"


* Label key variables for clarity in outputs

label var interaction "Exposed to war"
label var interaction_edu "Exposed to war*High SES"
label var head_high_SES "High SES"



********************************************************************************
* Table 3: Impacts of Conflict and Parental SES on Height                     
********************************************************************************


* Sample weight

gen individual_sample_weight = sample_weight / 1000000


*Regression (1): SES measured as Household Head's education >Secondary

reghdfe height_cm interaction interaction_edu head_high_SES $controls [pweight = individual_sample_weight], absorb (region year ) vce (cluster area)

outreg2 using table3.doc, replace label dec(3) keep(interaction interaction_edu head_high_SES ) ctitle(Household head) title(Table 3. Impacts of Conflict and Parental SES) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes, Own education, Controlled, Current Wealth, Controlled)

* Test total effect for high SES group (interaction + interaction_edu)

lincom interaction+interaction_edu


*Regression (2): SES measured as Partner of Household Head's education >Secondary


replace interaction_edu= interaction_parteduc
replace head_high_SES= second_partner_education


reghdfe height_cm interaction interaction_edu head_high_SES $controls [pweight = individual_sample_weight], absorb (region year) vce (cluster area)

outreg2 using table3.doc, append label dec(3) keep(interaction interaction_edu head_high_SES ) ctitle(Partner of Household head) title(Table 3. Impacts of Conflict and Parental SES) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes, Own education, Controlled, Current Wealth, Controlled)

* Test total effect for high SES group (interaction + interaction_edu)

lincom interaction+interaction_edu


*Regression (3): SES measured as Average education of Male Members older than 40. 

replace interaction_edu=interaction_high_SES
replace head_high_SES=high_SES

reghdfe height_cm interaction interaction_edu head_high_SES $controls [pweight = individual_sample_weight], absorb (region year) vce (cluster area)

outreg2 using table3.doc, append label dec(3) keep(interaction interaction_edu head_high_SES ) ctitle(Male Adults) title(Table 3 Impacts of Conflict and Parental SES) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes, Own education, Controlled, Current Wealth, Controlled)

* Test total effect for high SES group (interaction + interaction_edu)

lincom interaction+interaction_edu


*Regression (4): SES measured as Average education of Female Members older than 40. 

replace interaction_edu=interaction_high_SESfemal
replace head_high_SES=high_SESfemal

reghdfe height_cm interaction interaction_edu head_high_SES $controls [pweight = individual_sample_weight], absorb (region year) vce (cluster area)

outreg2 using table3.doc, append label dec(3) keep(interaction interaction_edu head_high_SES ) ctitle(Female Adults) title(Table 3 Impacts of Conflict and Parental SES) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes, Own education, Controlled, Current Wealth, Controlled)

* Test total effect for high SES group (interaction + interaction_edu)

lincom interaction+interaction_edu



****** Table A4: Impact of Conflict Exposure on Health Outcomes by Distance (Up to 600km) ******
	  	 	 
	   
use "nonmigrants", clear


* Generate distance category indicators beyond 300km

gen distance_4 = (min_distance > 300 & min_distance <= 400)
gen distance_5 = (min_distance > 400 & min_distance <= 500)
gen distance_6 = (min_distance > 500 & min_distance <= 600)

* Interaction terms: Conflict exposure in utero * distance categories

gen interaction4 = distance_4*uteroexp
gen interaction5 = distance_5*uteroexp
gen interaction6 = distance_6*uteroexp

* Label interaction variables by distance categories	   
	  
label var interaction "100km"
label var interaction2 "100-200km"
label var interaction3 "200-300km"
label var interaction4 "300-400km"
label var interaction5 "400-500km"
label var interaction6 "500-600km"



* Regression: Height outcome

reghdfe height_cm interaction interaction2 interaction3 interaction4 interaction5 interaction6 sex_members marital_status number_hhmembers, absorb(region year) vce(cluster area)

outreg2 using tableA4.doc, label dec(3) keep(interaction interaction2 interaction3 interaction4 interaction5 interaction6) append ctitle(reghdfe) title("Table A4 Extended DD") addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)

coefplot, vertical drop(_cons sex_members marital_status number_hhmembers) yline(0) xtitle("Exposure in different distances") ytitle(Height in cm)

* Regression: BMI outcome

reghdfe bmi_ interaction interaction2 interaction3 interaction4 interaction5 interaction6 sex_members marital_status number_hhmembers, absorb(region year) vce(cluster area)

outreg2 using tableA4.doc, label dec(3) keep(interaction interaction2 interaction3 interaction4 interaction5 interaction6) append ctitle(reghdfe) title("Table A4 Extended DD") addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)

coefplot, vertical drop(_cons sex_members marital_status number_hhmembers) yline(0) xtitle("Exposure in different distances") ytitle(BMI)

			  
			  
****** Table A5: Alternative Outcome Measure – Height-for-Age Z-score (HAZ) ******

* Standardize height using age- and sex-specific mean and standard deviation 
* calculated from individuals residing in non-conflict-affected regions (excluding Tigray and Afar)


****** Step 1: Load Dataset and Define Non-Conflict Sample ******


use "nonmigrants", clear


* Define non-conflict-affected regions (exclude Tigray=1 and Afar=2)

gen non_conflict = !inlist(region, 1, 2)

* Temporarily preserve non-conflict sample

preserve
keep if non_conflict == 1


****** Step 2: Compute Reference Height Statistics by Age and Sex ******

* Calculate mean height by age and sex groups
egen mean_ht = mean(height_cm), by(age_members sex_members)

* Calculate standard deviation of height by age and sex groups
egen sd_ht = sd(height_cm), by(age_members sex_members)


* Keep only reference variables

keep age_members sex_members mean_ht sd_ht

* Remove duplicate observations
duplicates drop

* Save reference height statistics dataset

save "ref_nonconflict_ht", replace


****** Step 3: Merge Reference Statistics with Full Sample ******

* Reload full sample dataset

use "nonmigrants", clear

* Merge reference mean and SD of height to full sample by age and sex

merge m:1 age_members sex_members using "ref_nonconflict_ht", keep(match) nogenerate


****** Step 4: Calculate Height-for-Age Z-score (HAZ) ******

* Generate HAZ variable using reference mean and standard deviation
gen haz = (height_cm - mean_ht) / sd_ht


****** Step 5: Adjust Sample Weights ******

* Rescale sample weights for analysis
gen individual_sample_weight = sample_weight / 1000000


****** Table A5: Robustness Checks Using Height-for-Age Z-score (HAZ) ******

****** Step 1: Baseline Regressions with Different Distance Bands (50km, 50-100km, 100-150km, 150-200km) ******


reghdfe haz interaction50km interaction100km interaction150km interaction200km sex_members marital_status number_hhmembers [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA5.doc, label dec(3) keep(interaction50km interaction100km interaction150km interaction200km) append title(Table A5 The Long run Impact of Conflict on HAZ) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)


****** Step 2: Baseline Regressions Including Individual Education and Household Wealth Controls ******


reghdfe haz interaction50km interaction100km interaction150km interaction200km sex_members marital_status number_hhmembers wealth_dummy_poor wealth_dummy_middle wealth_dummy_rich educ_dummy_noeduc educ_dummyg1 educ_dummyg2 educ_dummyg3 educ_dummyg4 educ_dummyg5 educ_dummyg6 educ_dummyg7 educ_dummyg8 educ_dummy_sec_hig  [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA5.doc, label dec(3) keep(interaction50km interaction100km interaction150km interaction200km) append title(Table A5 The Long run Impact of Conflict on HAZ) addtext(Own education, Controlled, Current wealth, Controlled, region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)


****** Step 3: Alternative Distance Bands (100km, 100-200km, 200-300km) Without Additional Controls ******
 
reghdfe haz interaction interaction2 interaction3 sex_members marital_status number_hhmembers  [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA5.doc, label dec(3) keep(interaction interaction2 interaction3) append title(Table A5 The Long run Impact of Conflict on HAZ) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)


****** Step 4: Alternative Distance Bands (100km, 100-200km, 200-300km) Including Individual Education and Household Wealth Controls ****** 


reghdfe haz interaction interaction2 interaction3 sex_members marital_status number_hhmembers wealth_dummy_poor wealth_dummy_middle wealth_dummy_rich educ_dummy_noeduc educ_dummyg1 educ_dummyg2 educ_dummyg3 educ_dummyg4 educ_dummyg5 educ_dummyg6 educ_dummyg7 educ_dummyg8 educ_dummy_sec_hig  [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA5.doc, label dec(3) keep(interaction interaction2 interaction3) append title(Table A5 The Long run Impact of Conflict on HAZ) addtext(Own education, Controlled, Current wealth, Controlled, region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)



****** Table A5 (WHO Standardization): HAZ Standardized Using WHO Growth Reference (Ages 15–19) ******

* HAZ is standardized using the WHO Growth Reference for individuals aged 15–19 years

****** Step 1: Prepare Subsample of Individuals Aged 15–19 ******


use "nonmigrants", clear


* Keep only individuals aged 19 years or younger
keep if age_members <= 19

* Convert age from years to months
gen age_months = age_members * 12

* Drop _merge variable if present
drop _merge 

* Save the subsample for merging

save "nonmigrants_subsample", replace


****** Step 2: Create WHO LMS Parameter Files for Boys and Girls (180–228 Months) ******

* WHO LMS parameters for Boys (sex = 1)

clear
input byte sex int age_months double(L M S)
1 180 -0.3521 170.1054 0.04213
1 192 -0.3521 172.2294 0.0421
1 204 -0.3521 173.4526 0.04198
1 216 -0.3521 174.1485 0.04186
1 228 -0.3521 174.4884 0.04177
end
save who_haz_boys.dta, replace

* WHO LMS parameters for Girls (sex = 2)

clear
input byte sex int age_months double(L M S)
2 180 -0.3833 159.679 0.04413
2 192 -0.3833 160.957 0.04398
2 204 -0.3833 161.731 0.04383
2 216 -0.3833 162.174 0.04376
2 228 -0.3833 162.349 0.04373
end
save who_haz_girls.dta, replace



****** Step 3: Append LMS Parameters and Prepare for Merging ******

use who_haz_boys.dta, clear
append using who_haz_girls.dta


* Replace sex = 2 with sex = 0 to match main dataset coding
replace sex = 0 if sex == 2

* Rename sex variable to match the main dataset
rename sex sex_members

* Save combined WHO LMS reference file

save who_haz_5_19.dta, replace


****** Step 4: Merge WHO LMS Reference with Subsample ******

* Merge WHO reference data by age (in months) and sex

merge 1:m age_months sex_members using "nonmigrants_subsample"


****** Step 5: Compute Height-for-Age Z-score (HAZ) Based on WHO LMS Method ******

gen haz = .
replace haz = ((height_cm/M)^L - 1)/(L*S) if L != 0
replace haz = ln(height_cm/M)/S if L == 0

****** Step 6: Generate Sample Weight ******

gen individual_sample_weight = sample_weight / 1000000



****** Table A5 (WHO Standardization): Regression Results Using HAZ (WHO Reference) ******

****** Regression – Distance Bands: 0–200km (50km intervals) Without Additional Controls ******

* Distance bands: 0–50km, 50–100km, 100–150km, 150–200km

reghdfe haz interaction50km interaction100km interaction150km interaction200km sex_members marital_status number_hhmembers [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA5.doc, label dec(3) keep(interaction50km interaction100km interaction150km interaction200km) append title(Table A5 The Long run Impact of Conflict on HAZ) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)


****** Regression – Distance Bands: 0–200km (50km intervals) With Education and Wealth Controls ******


reghdfe haz interaction50km interaction100km interaction150km interaction200km sex_members marital_status number_hhmembers wealth_dummy_poor wealth_dummy_middle wealth_dummy_rich educ_dummy_noeduc educ_dummyg1 educ_dummyg2 educ_dummyg3 educ_dummyg4 educ_dummyg5 educ_dummyg6 educ_dummyg7 educ_dummyg8 educ_dummy_sec_hig  [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA5.doc, label dec(3) keep(interaction50km interaction100km interaction150km interaction200km) append title(Table A5 The Long run Impact of Conflict on HAZ) addtext(Own education, Controlled, Current wealth, Controlled, region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)


****** Regression – Alternative Distance Bands: 0–300km (100km intervals) Without Controls ******

* Distance bands: 0–100km, 100–200km, 200–300km

 
reghdfe haz interaction interaction2 interaction3 sex_members marital_status number_hhmembers  [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA5.doc, label dec(3) keep(interaction interaction2 interaction3) append title(Table A5 The Long run Impact of Conflict on HAZ) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)


****** Regression – Alternative Distance Bands: 0–300km With Education and Wealth Controls ******
 

reghdfe haz interaction interaction2 interaction3 sex_members marital_status number_hhmembers wealth_dummy_poor wealth_dummy_middle wealth_dummy_rich educ_dummy_noeduc educ_dummyg1 educ_dummyg2 educ_dummyg3 educ_dummyg4 educ_dummyg5 educ_dummyg6 educ_dummyg7 educ_dummyg8 educ_dummy_sec_hig  [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA5.doc, label dec(3) keep(interaction interaction2 interaction3) append title(Table A5 The Long run Impact of Conflict on HAZ) addtext(Own education, Controlled, Current wealth, Controlled, region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)



****** Table A6: Impact of Conflict on Height Using Duration and Intensity of In-Utero Exposure (Based on Fatalities) ******

****** Step 1: Load Dataset ******
	  
	  
use "nonmigrants", clear

****** Step 2: Construct Fatalities-Based Conflict Exposure Variable ******

* Generate conflict exposure variable based on proximity-specific fatality data
gen FATALITIES = .

* Assign fatality counts based on distance match
replace FATALITIES = FATALITIES1 if abs(min_distance - distance1) < 0.001
replace FATALITIES = FATALITIES2 if abs(min_distance - distance2) < 0.001 & missing(FATALITIES)
replace FATALITIES = FATALITIES3 if abs(min_distance - distance3) < 0.001 & missing(FATALITIES)
replace FATALITIES = FATALITIES4 if abs(min_distance - distance4) < 0.001 & missing(FATALITIES)
replace FATALITIES = FATALITIES5 if abs(min_distance - distance5) < 0.001 & missing(FATALITIES)

* Assign zero fatalities for individuals farther than 100 km from conflict sites

replace FATALITIES = 0 if min_distance >= 100

****** Step 3: Generate Log-Transformed Fatalities Variable ******

gen log_fatalities = .
replace log_fatalities = ln(FATALITIES) if FATALITIES > 0
replace log_fatalities = 0 if FATALITIES == 0


****** Step 4: Generate Date of Birth and Conception Month ******

* Create date of birth variable using survey year and month of birth

gen dob = ym(year, g_month)
format dob %tm

* Define Ethiopian-Eritrean conflict period: May 1998 to December 2000

gen conflict_start = ym(1998, 5)     // May 1998
gen conflict_end   = ym(2000, 12)    // Dec 2000


* Estimate conception date as 9 months before birth

gen conception_date = dob - 9


****** Step 5: Calculate Total Duration of In-Utero Exposure to Conflict (in Months) ******

* Calculate overlap period between gestation and conflict window

gen overlap_start = max(conception_date, conflict_start)
gen overlap_end   = min(dob, conflict_end)

* Duration of exposure in months (0 if no overlap)
gen in_utero_exposure = max(0, overlap_end - overlap_start + 1)


****** Step 6: Construct Trimester-Specific Conflict Exposure Indicators ******

* ----- First Trimester -----

gen first_trimester_end = conception_date + 2   // conception month + 2 more = 3 months total

gen first_trimester_exposed = ///
    (conception_date <= conflict_end) & ///
    (first_trimester_end >= conflict_start)


* ----- Second Trimester -----
	
gen second_trimester_start = conception_date + 3
gen second_trimester_end   = conception_date + 5
gen second_trimester_exposed = ///
    (second_trimester_start <= conflict_end) & ///
    (second_trimester_end >= conflict_start)

* ----- Third Trimester -----

gen third_trimester_start = conception_date + 6
gen third_trimester_end   = conception_date + 8
gen third_trimester_exposed = ///
    (third_trimester_start <= conflict_end) & ///
    (third_trimester_end >= conflict_start)


****** Step 7: Label Variables for Clarity ******

label variable first_trimester_exposed "Exposed to conflict during 1st trimester"
label variable second_trimester_exposed "Exposed to conflict during 2nd trimester"
label variable third_trimester_exposed "Exposed to conflict during 3rd trimester"



****** Step 8: Generate Interaction Terms Between Trimester Exposure and Distance to Conflict ******

* Interaction: First trimester exposure × distance1


gen interaction1_first_trimester = first_trimester_exposed * distance_1
label variable interaction1_first_trimester "Interaction: 1st trimester exposed × distance1"

* Interaction: Second trimester exposure × distance1

gen interaction1_second_trimester = second_trimester_exposed * distance_1
label variable interaction1_second_trimester "Interaction: 2nd trimester exposed × distance1"

* Interaction: Third trimester exposure × distance1

gen interaction1_third_trimester = third_trimester_exposed * distance_1
label variable interaction1_third_trimester "Interaction: 3rd trimester exposed × distance1"


****** Step 9: Generate Interaction Terms Between Trimester Exposure and Conflict Intensity (Fatalities) ******

* First trimester × log(fatalities)


gen interaction_first_trimfatality = first_trimester_exposed * log_fatalities
label variable interaction_first_trimfatality "Interaction: 1st trimester × log(fatalities)"


* Second trimester × log(fatalities)

gen interaction_second_trimfatality = second_trimester_exposed * log_fatalities
label variable interaction_second_trimfatality "Interaction: 2nd trimester × log(fatalities)"


* Third trimester × log(fatalities)

gen interaction_third_trimfatality = third_trimester_exposed * log_fatalities
label variable interaction_third_trimfatality "Interaction: 3rd trimester × log(fatalities)"


****** Step 10: Adjust Sample Weight ******

gen individual_sample_weight = sample_weight / 1000000



****** Table A6: Regression – Height and In-Utero Exposure by Trimester ******

****** Regressions Within 100km Using Exposure × Distance1 ******


* Outcome: Height (in cm)
* Interaction terms between trimester-specific exposure and distance to conflict (within 100km)


reghdfe height_cm interaction1_first_trimester sex_members marital_status number_hhmembers [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA6.doc, label dec(3) keep( interaction1_first_trimester ) append ctitle(reghdfe) title("Table A6 Extended DD") addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)

reghdfe height_cm interaction1_second_trimester sex_members marital_status number_hhmembers [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA6.doc, label dec(3) keep( interaction1_second_trimester ) append ctitle(reghdfe) title("Table A6 Extended DD") addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)


reghdfe height_cm interaction1_third_trimester sex_members marital_status number_hhmembers [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA6.doc, label dec(3) keep( interaction1_third_trimester ) append ctitle(reghdfe) title("Table A6 Extended DD") addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)


******  Regressions Within 100km Using Exposure × Log(Fatalities) ******

* Outcome: Height (in cm)
* Interaction terms between trimester-specific exposure and intensity of conflict (log fatalities)



reghdfe height_cm interaction_first_trimfatality sex_members marital_status number_hhmembers [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA6.doc, label dec(3) keep( interaction_first_trimfatality ) append ctitle(reghdfe) title("Table A6 Extended DD") addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)

reghdfe height_cm interaction_second_trimfatality sex_members marital_status number_hhmembers [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA6.doc, label dec(3) keep( interaction_second_trimfatality ) append ctitle(reghdfe) title("Table A6 Extended DD") addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)


reghdfe height_cm interaction_third_trimfatality sex_members marital_status number_hhmembers [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA6.doc, label dec(3) keep( interaction_third_trimfatality ) append ctitle(reghdfe) title("Table A6 Extended DD") addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)




****** Table A7: Impact of Conflict on the Height of Young Adults – Alternative Functional Form ******

****** Step 1: Load Data and Generate Weights ******


use "nonmigrants", clear

* sample weights

gen individual_sample_weight = sample_weight / 1000000

****** Step 2: Generate Log Distance and Quadratic Terms ******

* Log of distance to conflict

gen log_min_distance = ln(min_distance) 
label variable log_min_distance "log of distance"

* Square of log distance

gen log_distance_sq = log_min_distance^2
label variable log_distance_sq "log of distance squared"

* Interaction terms with in utero exposure indicator

gen log_dist_in_utero = log_min_distance * uteroexp
gen log_dist_sq_in_utero = log_distance_sq * uteroexp


label variable log_dist_in_utero "log of distance*in utero"
label variable log_dist_sq_in_utero "log of distance squared*in utero"


****** Regression – Without Education and Wealth Controls ******

reghdfe height_cm log_dist_in_utero log_dist_sq_in_utero sex_members marital_status number_hhmembers [pweight = individual_sample_weight], absorb (region year) vce (cluster area)

outreg2 using tableA7.doc, label dec(3) keep(log_dist_in_utero log_dist_sq_in_utero) append ctitle(reghdfe) title(Table A7 The Long run Impact of Conflict on the Height of Young Adults) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)



****** Regression – With Education and Wealth Controls ******

reghdfe height_cm log_dist_in_utero log_dist_sq_in_utero sex_members marital_status number_hhmembers wealth_dummy_poor wealth_dummy_middle wealth_dummy_rich educ_dummy_noeduc educ_dummyg1 educ_dummyg2 educ_dummyg3 educ_dummyg4 educ_dummyg5 educ_dummyg6 educ_dummyg7 educ_dummyg8 educ_dummy_sec_hig [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA7.doc, label dec(3) keep(log_dist_in_utero log_dist_sq_in_utero) append ctitle(reghdfe) title(Table A7 The Long run Impact of Conflict on the Height of Young Adults) addtext( Own education, Controlled, Current wealth, Controlled, region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)



****** Figure B2: Visual Check of Demographic Composition – Age Distribution in Conflict vs Non-Conflict Areas ******

****** Step 1: Load Data and Define Conflict Area ******


use "nonmigrants", clear

* Define conflict area as locations within 300 km of the conflict zone

gen conflict_area =.
replace conflict_area = 1 if min_distance <= 300
replace conflict_area = 0 if min_distance > 300


****** Step 2: Plot Age Distribution – Boys ******

twoway ///
(kdensity age_members if sex_members == 1 & conflict_area == 1, lcolor(blue) lpattern(solid) ///
     legend(label(1 "Conflict Area"))) ///
(kdensity age_members if sex_members == 1 & conflict_area == 0, lcolor(red) lpattern(dash) ///
     legend(label(2 "Non-Conflict Area"))), ///
legend(order(1 2)) ///
xlabel(15(1)26, labsize(small)) ///
ylabel(, labsize(small)) ///
title("Age - Boys")


****** Step 3: Plot Age Distribution – Girls ******


twoway ///
(kdensity age_members if sex_members == 0 & conflict_area == 1, lcolor(blue) lpattern(solid) ///
     legend(label(1 "Conflict Area"))) ///
(kdensity age_members if sex_members == 0 & conflict_area == 0, lcolor(red) lpattern(dash) ///
     legend(label(2 "Non-Conflict Area"))), ///
legend(order(1 2)) ///
xlabel(15(1)26, labsize(small)) ///
ylabel(, labsize(small)) ///
title("Age - Girls")




****** Table A8: Robustness Check – Mother and Children Characteristics if Exposed to War In Utero ******

****** Step 1: Load 2000 DHS KR Dataset ******


use "Data\DHS - 2000 & 2005\DHS 2000\KR\KR", clear


****** Step 2: Rename Variables for Clarity ******

rename caseid case_identification
rename bidx birth_number
rename v000 country_code
rename v001 cluster_number

rename v002 household_number
rename v003 resp_line_number
rename v004 ultimate_unit
rename v005 sample_weight
rename v006 month_interviewec
rename v007 year_interviewec
rename v008 date_interviewec
rename v016 day_interviewec
rename sintdg day_interviewgc
rename sintmg month_interviewgc
rename sintcg date_interviewgc
rename v012 res_age
rename v024 region
rename v107 highest_years_educa
rename v131 ethnicity
rename v133 resp_education
rename v136 number_hhmembers
rename v137 children_under5
rename v149 education_attainment
rename v106 highest_education
rename v150 res_relation
rename v151 sex_hh_head
rename v152 age_hhead
rename v201 total_child
rename v202 sons_home
rename v203 daughters_home
rename v208 birth_last5years
rename v209 birth_pastyear
rename v437 resp_weight
rename v438 res_height
rename v445 resp_bmi
rename v501 marital_status
rename v511 age_marriage

rename v701 partner_educalevel 
rename v702 partner_highesteduc 
rename v704 partner_occupation 
rename v705 occupation_type 
rename v714 resp_working 
rename v715 husbandeduc_years 
rename v716 resp_occupation 
rename v717 respoccupation_type 
rename v729 partnereduc_attainment 
rename v730 partners_age

rename bord birth_ordernumber 
rename b1 month_birth 
rename b2 year_birth 
rename b4 sex_child 
rename b5 child_alive 
rename b6 age_death 
rename b16 child_linenumber

rename hw1 age_months
rename hw2 weight_kilograms
rename hw3 height_centimeters
rename hw15 height_lying
rename hw10 wt_htpercent
rename hw11 wt_htsd


rename v120 has_radio 
rename v121 has_television 
rename v158 freq_list_radio 
rename v159 freq_watch_telev

rename v228 ever_termpreg
rename v229 month_preg_ended 
rename v230 year_preg_ended 
rename v231 cmc_preg_ended 
rename v232 completeness_last
rename v233 months_preg_ended


****** Step 3: Calculate Children's Age and Year of Birth ******

* Calculate age in years (floor of age in months divided by 12)

gen age_years = floor( age_months / 12)

* Calculate remainder months after full years
gen age_months_remainder = mod(age_months, 12)

* Age in years with fractional months
gen age_years_mon = age_years + (age_months_remainder / 12)

* Interview year fixed as 2000 for DHS 2000
gen year_interview =2000

* Calculate birth year accounting for interview month and months remainder
gen birth_year = year_interview - age_years - cond(age_months_remainder > month_interviewgc , 1, 0)

* Calculate birth month, adjusted for interview month and remainder
gen birth_month = mod( month_interviewgc - age_months_remainder + 11, 12) + 1

* For deceased children, calculate age in months (approximate)
gen age_months_dead = age_death/30

* Calculate birth year for deceased children
gen birth_year_dead = year_interview - 0 - cond(age_months_dead > month_interviewgc , 1, 0)

* Calculate birth month for deceased children
gen birth_month_dead = mod( month_interviewgc - age_months_dead + 11, 12) + 1

* Replace missing birth year/month with deceased child's values if needed

replace birth_year = birth_year_dead if missing(birth_year)
replace birth_month = birth_month_dead if missing(birth_month)

****** Step 4: Label Variables for Clarity ******

label var res_age "mother's age"
label var region "1= tigray 2=affar 3=amhara 4=oromiya 5=somali 6=ben-gumz 7=snnp 8=gambela 9=harari 10=addis 11=dire dawa"
label var resp_weight "mother's weight"
label var res_height "mother's height"
label var education_attainment "0=no educa 1=incomple prim 2=complete prim 3=incomple sec 4=complete sec 5=higher"
label var sex_child " 1=male 2=female"
label var highest_years_educa "mother's highest years of education"
label var highest_education "0=no education 1=primary 2=secondary 3=higher 8=Don't know"
label var res_relation " 1=head 2=wife 3=daughter 4=daughter_in_law 5=grand-da 6=mother 7=mother-i 8=sister 9=  10=other_re 11=adopted 12=not rela"
label var sex_hh_head " 1=male 2=female"
label var age_hhead "age of household head"
label var sons_home "sons at home"
label var daughters_home "daughters at home"
label var marital_status "0=never mar 1=married 2=living tog 3=widowed 4=divorced"
label var partnereduc_attainment "0=no educa 1=incomple prim 2=complete prim 3=incomple sec 4=complete sec 5=higher"
label var age_months "age in months"
label var weight_kilograms "weight in kilograms"
label var height_centimeters "height in centimeters"
label var height_lying "height: lying or standing"
label var year_birth "year_birth"
label var weight_kilograms "weight_kilograms"
label var height_centimeters "height_centimeters"
label var wt_htpercent "wt/ht percentile"
label var wt_htsd "wt/ht standard deviations"
label var year_birth "year of birth"

****** Step 5: Keep Relevant Variables for Analysis ******

keep case_identification birth_number cluster_number country_code household_number resp_line_number ultimate_unit sample_weight month_interviewec year_interviewec date_interviewec day_interviewec day_interviewgc month_interviewgc date_interviewgc res_age region ethnicity resp_educatio number_hhmembers children_under5 education_attainment res_relation sex_hh_head age_hhead total_child sons_home daughters_home birth_last5years birth_pastyear resp_weight res_height resp_bmi marital_status age_marriage partner_educalevel highest_education partner_highesteduc partner_occupation occupation_type  resp_working husbandeduc_years resp_occupation respoccupation_type partnereduc_attainment partners_age birth_ordernumber month_birth year_birth sex_child  child_alive age_death child_linenumber age_months weight_kilograms height_centimeters height_lying wt_htpercent wt_htsd age_years age_months_remainder age_years_mon birth_year birth_month has_radio has_television freq_list_radio freq_watch_telev ever_termpreg month_preg_ended year_preg_ended cmc_preg_ended completeness_last months_preg_ended highest_years_educa child_alive



****** Merge DHS Data with Geographic Coordinates ******

* Merge DHS individual data with geographic cluster data by cluster number


merge m:1 cluster_number using "Data\DHS - 2000 & 2005\DHS Geographic\2000\GE"

* Save merged dataset temporarily

save "Data\DHS - 2000 & 2005\DHS 2000\KR\merge", replace


****** Merge DHS-Geographic Data with ACLED Conflict Data ******


use "Data\DHS - 2000 & 2005\DHS 2000\KR\merge", clear

* Create dummy variable for merge key with ACLED data (assuming 1-to-many merge)
gen n=1

* Remove any leftover _merge variable from previous merge
drop _merge

* Merge with ACLED conflict event data on variable 'n' (assumed merge key; verify correct key)

merge m:1 n using "Data\ACLED\edit"

* Drop temporary merge key variable
drop n

* Save final merged dataset for analysis
save "Data\DHS - 2000 & 2005\DHS 2000\KR\merge2", replace


****** Calculate Distances from Each Individual to Conflict Locations ******

* Calculate geographic distance (in km) from respondent's location (LATNUM, LONGNUM) to each conflict site (LATITUDE1-5, LONGITUDE1-5)


geodist LATNUM LONGNUM LATITUDE1 LONGITUDE1, gen(distance1)

geodist LATNUM LONGNUM LATITUDE2 LONGITUDE2, gen(distance2)

geodist LATNUM LONGNUM LATITUDE3 LONGITUDE3, gen(distance3)

geodist LATNUM LONGNUM LATITUDE4 LONGITUDE4, gen(distance4)

geodist LATNUM LONGNUM LATITUDE5 LONGITUDE5, gen(distance5)


* Compute minimum distance among all conflict sites for each individual

egen min_distance = rowmin( distance1 distance2 distance3 distance4 distance5 )

* Save updated dataset

save  "Data\DHS - 2000 & 2005\DHS 2000\KR\merge2", replace


****** Prepare Variables for Analysis ******

use "Data\DHS - 2000 & 2005\DHS 2000\KR\merge2", clear


* Convert height and weight to standard units

gen height_cm = height_centimeters / 10
gen weight_kg = weight_kilograms / 10

label var height_cm "child height in cm"
label var weight_kg "child weight in kg"

* Create distance category dummies based on minimum distance to conflict

gen distance_1 = (min_distance <= 100)
gen distance_2 = (min_distance > 100 & min_distance <= 200)
gen distance_3 = (min_distance > 200 & min_distance <= 300)
	

label variable distance_1 "with in 100km (1) or >= 100km (0)"
label variable distance_2 "with in 100-200km (1) or not (0)"
label variable distance_3 "with in 200-300km (1) or not (0)"
	

* Generate in utero exposure dummy based on birth year and month
				   			   
gen uteroexp = ( birth_year  > 1998) | (( birth_year == 1998) & ( birth_month >= 6))
label variable uteroexp "In Utero (1) or After Birth (0)"

* Generate interaction terms between distance categories and in utero exposure

gen interaction = distance_1*uteroexp
gen interaction2 = distance_2*uteroexp
gen interaction3 = distance_3*uteroexp

label variable interaction "Exposure within 100km in utero"
label variable interaction2 "Exposure within 100km-200km in utero"
label variable interaction3 "Exposure within 200km-300km in utero"


* Rename variables to match regression requirements
 
rename cluster_number area
rename birth_year year

* Save the final, cleaned dataset for analysis

save "Data\DHS - 2000 & 2005\DHS 2000\KR\merge2", replace


****** Prepare Maternal Characteristics for Selection/Fertility Bias Analysis ******


use "Data\DHS - 2000 & 2005\DHS 2000\KR\merge2", clear

* Replace missing values of mother's education with 0 (assumed: no education)

replace highest_years_educa = 0 if missing(highest_years_educa)

* Convert mother's height and BMI to standard units
gen mot_height_cm = res_height/10
gen mot_bmi = resp_bmi/100


label var mot_height_cm "Mothers hight(cm)"
label var mot_bmi "Mothers BMI"

* Relabel key explanatory variables for clarity in output tables
label var interaction "Mother lives within 100km * pregnant during the war"
label var distance_1 "Mother lives within 100km"
label var uteroexp "Mother was pregnant during the war"

* Construct variable for number of births during the conflict period (June 1998 onward)

gen no_birth_war = birth_last5years if ( year  > 1998) | ((year == 1998) & ( birth_month >= 6))
replace no_birth_war = 0 if missing( no_birth_war )

* Approximate mother's year of birth

gen year_birth_moth = 2000- res_age

* sample weights
gen individual_sample_weight = sample_weight / 1000000

* Save the updated dataset
save "Data\DHS - 2000 & 2005\DHS 2000\KR\merge2", replace



****** Table A8: Robustness Checks Against Selection Bias – Selective fertility - 2000 DHS ******


use "Data\DHS - 2000 & 2005\DHS 2000\KR\merge2", clear


* Regression models using 100 km definition of conflict exposure
* Dependent variables: maternal education, fertility, anthropometrics, household characteristics

* 1. Mother's education level
reghdfe highest_years_educa interaction distance_1 uteroexp number_hhmembers marital_status res_age [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA8.doc, label dec(3) keep(interaction distance_1 uteroexp) replace ctitle(Education) 

* 2. Number of births in last 5 years
reghdfe birth_last5years interaction distance_1 uteroexp number_hhmembers highest_years_educa marital_status res_age [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA8.doc, label dec(3) keep(interaction distance_1 uteroexp) append ctitle(Number of births) 

* 3. Mother's height
reghdfe mot_height_cm interaction distance_1 uteroexp number_hhmembers highest_years_educa marital_status res_age [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA8.doc, label dec(3) keep(interaction distance_1 uteroexp) append ctitle(Height) 

* 4. Mother's BMI
reghdfe mot_bmi interaction distance_1 uteroexp number_hhmembers highest_years_educa marital_status res_age [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA8.doc, label dec(3) keep(interaction distance_1 uteroexp) append ctitle(BMI) 

* 5. Child sex
reghdfe sex_child interaction distance_1 uteroexp number_hhmembers highest_years_educa marital_status res_age [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA8.doc, label dec(3) keep(interaction distance_1 uteroexp) append ctitle(Child sex) 

* 6. Household head's age
reghdfe age_hhead interaction distance_1 uteroexp number_hhmembers highest_years_educa marital_status res_age [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA8.doc, label dec(3) keep(interaction distance_1 uteroexp) append ctitle(HH head age)   


* 7. Household head's sex
reghdfe sex_hh_head interaction distance_1 uteroexp number_hhmembers highest_years_educa marital_status res_age [pweight = individual_sample_weight], absorb ( region year) vce (cluster area)

outreg2 using tableA8.doc, label dec(3) keep(interaction distance_1 uteroexp) append ctitle(HH head sex) 
 

 
******* Table A9: Selective Mortality – 2000 DHS *******

*** Outcome: Child Mortality (1 = not alive, 0 = alive)


use "Data\DHS - 2000 & 2005\DHS 2000\KR\merge2", clear

* Set missing years of education to zero
replace highest_years_educa = 0 if missing(highest_years_educa)

* Create child mortality indicator

gen child_mortality = (child_alive == 0)
label variable child_mortality "Indicator for child mortality (1 if child is not alive, 0 if alive)"

* Save updated dataset

save "Data\DHS - 2000 & 2005\DHS 2000\KR\merge2", replace



******* Table A9: Regression: Impact of Conflict Exposure on Child Mortality (2000 DHS) *******

* Controls: maternal education, number of household members, marital status, mother's age
* FE: region and birth cohort
* Clustered SE at area level


reghdfe child_mortality interaction interaction2 interaction3 highest_years_educa number_hhmembers marital_status res_age [pweight = individual_sample_weight], absorb (region year) vce (cluster area)

outreg2 using tableA9.doc, label dec(3) keep(interaction interaction2 interaction3) replace ctitle(reghdfe) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)



******* Table A9: Selective Mortality – 2005 DHS Sample *******


****** Step 1: Load 2000 DHS KR Dataset ******

use "Data\DHS - 2000 & 2005\DHS 2005\BR\BR", clear

****** Step 2: Rename Variables for Clarity ******

rename caseid case_identification
rename bidx birth_number
rename v000 country_code
rename v002 household_number
rename v003 resp_line_number
rename v004 ultimate_unit
rename v005 sample_weight
rename v006 month_interviewec
rename v007 year_interviewec
rename v008 date_interviewec
rename v016 day_interviewec
rename sintdg day_interviewgc
rename sintmg month_interviewgc
rename sintcg date_interviewgc
rename v012 res_age
rename v024 region
rename v131 ethnicity
rename v133 resp_education
rename v136 number_hhmembers
rename v137 children_under5
rename v149 education_attainment
rename v106 highest_education
rename v107 highest_years_educa

rename v150 res_relation
rename v151 sex_hh_head
rename v152 age_hhead
rename v190 wealth_index 
rename v191 wealthindex_factor 
rename awfactw woman_factorwealth
rename v201 total_child
rename v202 sons_home
rename v203 daughters_home
rename v208 birth_last5years
rename v209 birth_pastyear
rename v437 resp_weight
rename v438 res_height
rename v445 resp_bmi
rename v501 marital_status
rename v511 age_marriage

rename v701 partner_educalevel 
rename v702 partner_highesteduc 
rename v704 partner_occupation 
rename v705 occupation_type 
rename v714 resp_working 
rename v715 husbandeduc_years 
rename v716 resp_occupation 
rename v717 respoccupation_type 
rename v729 partnereduc_attainment 
rename v730 partners_age

rename bord birth_ordernumber 
rename b1 month_birth 
rename b2 year_birth 
rename b4 sex_child 
rename b5 child_alive 
rename b6 age_death 
rename b16 child_linenumber

rename hw1 age_months
rename hw2 weight_kilograms
rename hw3 height_centimeters
rename hw15 height_lying
rename hw10 wt_htpercent
rename hw11 wt_htsd


rename v228 ever_termpreg
rename v229 month_preg_ended 
rename v230 year_preg_ended 
rename v231 cmc_preg_ended 
rename v232 completeness_last
rename v233 months_preg_ended


****** Step 3: Label Key Variables ******
label var highest_years_educa "mother's highest years of education"
replace highest_years_educa = 0 if missing(highest_years_educa)


****** Step 4: Calculate Child Age and Reconstruct Birth Date ******

drop age_months
gen age_months = ( year_interviewec - year_birth ) * 12 + ( month_interviewec - month_birth )


gen age_years = floor( age_months / 12)
gen age_months_remainder = mod(age_months, 12)
gen age_years_mon = age_years + (age_months_remainder / 12)


gen year_interview =2005
gen birth_year = year_interview - age_years - cond(age_months_remainder > month_interviewgc , 1, 0)
gen birth_month = mod( month_interviewgc - age_months_remainder + 11, 12) + 1

****** Step 5: Add/Refine Labels for Analysis ******

label var res_age "respodents age"
label var region "1= tigray 2=affar 3=amhara 4=oromiya 5=somali 6=ben-gumz 7=snnp 8=gambela 9=harari 10=addis 11=dire dawa"
label var resp_weight "mother's weight"
label var res_height "mother's height"
label var resp_education "respondents education"
label var education_attainment "0=no educa 1=incomple prim 2=complete prim 3=incomple sec 4=complete sec 5=higher"
label var sex_child " 1=male 2=female"

label var res_relation " 1=head 2=wife 3=daughter 4=daughter_in_law 5=grand-da 6=mother 7=mother-i 8=sister 9=  10=other_re 11=adopted 12=not rela"
label var sex_hh_head " 1=male 2=female"
label var age_hhead "age of household head"
label var wealth_index  "Household Wealth Index"
label var wealthindex_factor "Wealth Index Factor"
label var woman_factorwealth "Woman Factor for Wealth"
label var sons_home "sons at home"
label var daughters_home "daughters at home"
label var marital_status "0=never mar 1=married 2=living tog 3=widowed 4=divorced"
label var partnereduc_attainment "0=no educa 1=incomple prim 2=complete prim 3=incomple sec 4=complete sec 5=higher"
label var age_months "age in months"
label var weight_kilograms "weight in kilograms"
label var height_centimeters "height in centimeters"
label var height_lying "height: lying or standing"
label var year_birth "year_birth"
label var weight_kilograms "weight_kilograms"
label var height_centimeters "height_centimeters"
label var wt_htpercent "wt/ht percentile"
label var wt_htsd "wt/ht standard deviations"
label var year_birth "year of birth"

label var highest_education "0=no education 1=primary 2=secondary 3=higher 8=Don't know


****** Merge with Geographic Coordinates ******

* Merge 2005 BR dataset with geographic data using cluster_number

merge m:1 cluster_number using "Data\DHS - 2000 & 2005\DHS Geographic\2005\GE.dta"

* Save intermediate dataset after geographic merge

save "Data\DHS - 2000 & 2005\DHS 2005\BR\child_death",replace


****** Merge with Conflict Data (ACLED) ******

use "Data\DHS - 2000 & 2005\DHS 2005\BR\child_death",replace

gen n=1

* Clean previous merge result if any
drop _merge

* Merge with conflict dataset (ACLED)
merge m:1 n using "Data\ACLED\edit"
drop n

* Save final merged dataset for mortality analysis
save "Data\DHS - 2000 & 2005\DHS 2005\BR\child_death",replace


****** Calculate Distances from Clusters to Conflict Sites ******

* Calculate geographic distances between survey cluster and conflict locations



geodist LATNUM LONGNUM LATITUDE1 LONGITUDE1, gen(distance1)

geodist LATNUM LONGNUM LATITUDE2 LONGITUDE2, gen(distance2)

geodist LATNUM LONGNUM LATITUDE3 LONGITUDE3, gen(distance3)

geodist LATNUM LONGNUM LATITUDE4 LONGITUDE4, gen(distance4)

geodist LATNUM LONGNUM LATITUDE5 LONGITUDE5, gen(distance5)


****** Compute Minimum Distance ******
* Generate the minimum distance to any conflict site for each observation

egen min_distance = rowmin( distance1 distance2 distance3 distance4 distance5 )


****** Save Dataset ******

save "Data\DHS - 2000 & 2005\DHS 2005\BR\child_death",replace


********** Define Exposure Variables – 2005 DHS Sample **********

use "Data\DHS - 2000 & 2005\DHS 2005\BR\child_death",clear

* Create distance indicators based on proximity to conflict zones

gen distance_1 = (min_distance <= 100)
gen distance_2 = (min_distance > 100 & min_distance <= 200)
gen distance_3 = (min_distance > 200 & min_distance <= 300)
	

label variable distance_1 "with in 100km (1) or >= 100km (0)"
label variable distance_2 "with in 100-200km (1) or not (0)"
label variable distance_3 "with in 200-300km (1) or not (0)"


* Restrict sample to children born between 1996 and 2000 (under 5 during the war)

drop if birth_year > 2000
drop if birth_year <= 1995

* Generate in utero exposure indicator for children conceived during the war
				   			   
gen uteroexp = ( birth_year  > 1998) | (( birth_year == 1998) & ( birth_month >= 6))
label variable uteroexp "In Utero (1) or After Birth (0)"

* Create interaction variables between distance and in utero exposure

gen interaction = distance_1*uteroexp
gen interaction2 = distance_2*uteroexp
gen interaction3 = distance_3*uteroexp


label variable interaction "Exposure within 100km in utero"
label variable interaction2 "Exposure within 100km-200km in utero"
label variable interaction3 "Exposure within 200km-300km in utero"


* Rename variables for consistency
 
rename cluster_number area
rename birth_year year


*************** Define Child Mortality Indicator ***************

gen child_mortality = (child_alive == 0)
label variable child_mortality "Indicator for child mortality (1 if child is not alive, 0 if alive)"

* Calculate approximate birth year of child based on respondent age and interview year

gen year_birth_moth = 2005 - res_age


save "Data\DHS - 2000 & 2005\DHS 2005\BR\child_death",replace


******* Table A9: Regression: Impact of Conflict Exposure on Child Mortality (2005 DHS) *******

* Controls: maternal education, number of household members, marital status, mother's age
* FE: region and birth cohort
* Clustered SE at area level

use "Data\DHS - 2000 & 2005\DHS 2005\BR\child_death",clear

* sample weight
gen individual_sample_weight = sample_weight / 1000000


reghdfe child_mortality interaction interaction2 interaction3 highest_years_educa number_hhmembers marital_status res_age [pweight = individual_sample_weight], absorb (region year) vce (cluster area)

outreg2 using tableA9.doc, label dec(3) keep(interaction interaction2 interaction3) append ctitle(reghdfe) addtext(region FE, Yes, Cohort FE, Yes, Cluster SE, Yes)




***************** END ***********